@<template>
  <div>
    <swiper ref="swiper">
      <swiper-item v-for='item in banners' v-bind:key='item.title'>
        <a :href="item.link">
          <img :src="item.image" alt="" @load="swiperLoad">
        </a>
      </swiper-item>
    </swiper>
  </div>
</template>

<script>
import {Swiper, SwiperItem} from 'components/common/swiper'
export default {
    components: {
        Swiper,
        SwiperItem,
    },
    props: {
        banners: {
            type: Array,
            default(){
                return []
            }
        },
        
    },
    data(){
      return {
        flag: false,

      }
    },
    methods: {
      swiperLoad(){
        if(!this.flag) {
          this.$emit('swiperLoad')
          this.flag = true
        }
        
      }
    }
}
</script>

<style>

</style>